#!/bin/bash
if [ ! -n "${1}" ];then
    echo "ERROR! mysql root password is required."
    exit -1;
fi
#sleep 5;
data=`mysql -uroot -p${1} -e "show databases;"`
#echo $data
#echo $result
result=`echo $data|grep mysql`
if [ -z "$result" ];then
    echo "ERROR! mysql start failure. data:$data"
#    mysql -e "use mysql;update user set password=password('bxn500');flush privileges;"
else
    echo "SUCCESS"
fi
